<?
/*
 *   Pmail easy way to send emails
 *   Copyright (C) 2009  Felipe Theodoro Gonçalves (www.ftgoncalves.com)
 *
 *   This program is free software: you can redistribute it and/or modify
 *	 it under the terms of the GNU General Public License as published by
 *   the Free Software Foundation, either version 3 of the License, or
 *   (at your option) any later version.
 *
 *   This program is distributed in the hope that it will be useful,
 *   but WITHOUT ANY WARRANTY; without even the implied warranty of
 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *   GNU General Public License for more details.
 *
 *   You should have received a copy of the GNU General Public License
 *   along with this program.  If not, see <http://www.gnu.org/licenses/>.
 *
 */
?>
<div id="page">
	<h2><?= __d('pmail', 'Report'); ?></h2>
	<table>
		<caption class="left"><?= __d('pmail', 'List of administrators'); ?></caption>
		<thead>
			<?= $this->renderElement('paginacao_top', array('colspan' => 4)); ?>
			<tr>
				<th><?= __d('pmail', 'Email'); ?></th>
				<th><?= __d('pmail', 'Success'); ?></th>
				<th><?= __d('pmail', 'Error'); ?></th>
				<th><?= __d('pmail', 'Date'); ?></th>
			</tr>
		</thead>
		<tbody>
			<?php
				$count = 0;
				foreach($reports as $report){
					echo '<tr id="' . $count++ . '">';
						echo '<td>' . $report['Report']['identifier'] . '</td>';
						echo '<td>' . $report['Report']['sucesso'] . '</td>';
						echo '<td>' . $report['Report']['erro'] . '</td>';
						echo '<td>' . str_replace('-', '/', $report['Report']['created']) . '</td>';
					echo '</tr>';
				}
			?>
		</tbody>
		<tfoot>
			<?= $this->renderElement('paginacao_footer', array('colspan' => 4)); ?>
		</tfoot>
	</table>
</div>
<div id="sidebar">
	<h4><?= __d('pmail', 'Coments'); ?></h4>
	<p><?= __d('pmail', 'Report of emails sent'); ?></p>
	<?= $this->renderElement('recommended/links') ?>
</div>
<div class="clear"></div>